//
//  TDPayResultShowC.m
//  TBRentClient
//
//  Created by tonbright on 2018/7/2.
//  Copyright © 2018年 tonbright. All rights reserved.
//

#import "TDPayResultShowC.h"
#import "TDCarDetailC.h"
#import "UINavigationController+SXFullScreen.h"

@interface TDPayResultShowC ()
@property (weak, nonatomic) IBOutlet UIButton *backBtn;

@end

@implementation TDPayResultShowC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}

- (void)setupUI {
    self.view.backgroundColor = [UIColor whiteColor];
    self.backBtn.layer.cornerRadius = 5;
    self.backBtn.layer.masksToBounds = YES;
    self.backBtn.layer.borderColor = [UIColor colorWithHex:0xbf0021].CGColor;
    self.backBtn.layer.borderWidth = 1;
    self.sx_disableInteractivePop = YES;

}

- (IBAction)finishBtnClick:(UIButton *)sender {
    if (self.isFromDingDan) {
        [self.navigationController popToRootViewControllerAnimated:YES];
        return;
    }
    for (UIViewController *controller in self.navigationController.viewControllers) {
        if ([controller isKindOfClass:[TDCarDetailC class]]) {
            [[NSNotificationCenter defaultCenter] postNotificationName:@"kRemoveTDSelDate" object:nil];
            [self.navigationController popToViewController:controller animated:YES];
        }
    }
}


@end
